package com.hwadee.service.impl;

import com.hwadee.mapper.AlertMapper;
import com.hwadee.pojo.Alert;
import com.hwadee.service.AlertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AlertServiceImpl implements AlertService {

    @Autowired
    private AlertMapper alertMapper;

    @Override
    public List<Alert> getAllAlerts() {
        return alertMapper.getAllAlerts();
    }

    @Override
    public int addAlert(Alert alert) {
        return alertMapper.addAlert(alert);
    }

    @Override
    public int deleteAlert(Integer id) {
        return alertMapper.deleteAlert(id);
    }

    @Override
    public int updateAlert(Alert alert) {
        return alertMapper.updateAlert(alert);
    }
}
